package mybox.junit;

import java.io.IOException;

import mybox.engine.File4Qcad;
import mybox.engine.PlatteOOExt;
import mybox.engine.PlatteOO;
import mybox.engine.QVector;
import mybox.engine.ReferenceIOutput;


import junit.framework.TestCase;

public class PlatteTC extends TestCase {
	
	public void test_PlatteOO() 
	throws SecurityException, IOException {
		
	
	File4Qcad file4qcad = new File4Qcad(ReferenceIOutput.testoutputFile());		
	QVector aktPos = new QVector(0,0);
	
	double laenge=40;	
	double breite=50;
	double materialDicke=4;	
	double zinkungsFaktor=1;
	double laserBreite=1;
	//double laserBreite=0.03;	
	String[] type = new String[] {"M","M","M","M"};
	
	PlatteOO platteOO = new PlatteOO(file4qcad, 
			aktPos,
			type,
			laenge,
			breite,			
			materialDicke,
			zinkungsFaktor,
			laserBreite);
	
	platteOO.draw();
	
	file4qcad.close();
	
}
	
	public void test_PlatteOOExtended() 
	throws SecurityException, IOException {
		
	
	File4Qcad file4qcad = new File4Qcad("/home/hannes/Desktop/output.dxf");		
	QVector aktPos = new QVector(0,0);
	
	double laenge=40;	
	double breite=50;
	double extension=30;
	
	double materialDicke=4;	
	double zinkungsFaktor=1;
	//double laserBreite=1;
	double laserBreite=0.03;
	
	String[] type = new String[] {"F","F","F","F"};
	PlatteOOExt platteOOGP = new PlatteOOExt(
			file4qcad, 
			aktPos,		
			type,
			laenge,
			breite,	
			extension,
			materialDicke,
			zinkungsFaktor,
			laserBreite);	
	platteOOGP.draw();
	
	aktPos=platteOOGP.ecke[1];
	aktPos.x+=materialDicke;
	
	PlatteOOExt platteOODP = new PlatteOOExt(
			file4qcad, 
			aktPos,		
			type,
			laenge,
			breite,	
			extension,
			materialDicke,
			zinkungsFaktor,
			laserBreite);	
	platteOODP.draw();
			
	file4qcad.close();
	
}
	

}
